import {
	localeProps
} from '@form-create/designer/src/utils';
import uniqueId from '@form-create/utils/lib/unique';

const label = '表单问卷';
const name = 'actqa';

export default {
	menu: 'activity',
	icon: 'icon-table-form',
	label,
	name,
	inside: false,
	drag: true,
	dragBtn: true,
	mask: false,
	input: false,
	/*subForm: 'object',*/
	event: ['change'],
	loadRule(rule) {
		rule.children = rule.props.rule || [];
		rule.type = 'ActQA';
		delete rule.props.rule;
	},
	parseRule(rule) {
		rule.props.rule = rule.children;
		rule.type = 'ActQA';
		delete rule.children;
	},
	rule() {
		return {
			type: 'ActQA',
			/*
			field: uniqueId(),
			title: "表单",
			info: '',
			$required: false,
			*/
			props: {
				title: '表单问券',
			},
			children: []
		};
	},
	props() {
		return [{
			type: 'input',
			field: 'title',
			title: "标题（title）",
			value: "表单问卷"
		}];
	}
};
